
import xadmin
from xadmin import views

from .models import  VerifyCode



# Register your models here.


class BaseSetting:
    # 启用主题管理器
    enable_themes = True
    # 使用主题
    use_bootswatch = True

class GlobalSettings:
    # 设置后台顶部标题
    site_title = "得米商城"
    # 设置后台底部标题
    site_footer = "2022@得米商城"
    # 设置左侧菜单可折叠
    menu_style = "accordion"


class VerifyCodeAdmin(object):
    list_display = ['code', 'mobile', "add_time"]


xadmin.site.register(VerifyCode, VerifyCodeAdmin)
xadmin.site.register(views.BaseAdminView, BaseSetting)
xadmin.site.register(views.CommAdminView, GlobalSettings)

